#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
	int n, count=0, a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d%d%d", &a, &b, &c);
		if (a + b + c < 180) count++;
	}
	printf("%d", count);
}